<div class="popup_body">
    <div class="ui_table">
        <form method="post">
            <input type="hidden" name="id" value="${(entity.id)!''}">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td width="70" align="right">价格(按次)：</td>
                    <td><input id="times_price_${pid}" class="easyui-numberspinner"   style="width:180px;height: 30px " required="required" data-options="min:0.00,precision:2" value="${(entity.timesPrice)/100!''}">&nbsp;&nbsp;元</td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="popup_btn">
    <button class="btn btn_red ok">确定</button>
    <button class="btn btn_border close">关闭</button>
</div>
<script>

    (function() {
        var pid = '${pid}',
                win = $('#' + pid),
                form = win.find('form');

        win.find('button.ok').click(function() {
            form.form('submit', {
                url: '${contextPath}/security/hdw/exchange_price_time/update.htm',
                onSubmit: function(param) {
                    var timesPrice = $('#times_price_${pid}').numberspinner('getValue');
                    param.timesPrice = parseInt(Math.round(timesPrice * 100));
                    return true;
                },
                success: function(text) {
                    var json = $.evalJSON(text);
                <@app.json_jump/>
                    if(json.success) {
                        $.messager.alert('提示信息', '操作成功', 'info');
                        win.window('close');
                    } else {
                        $.messager.alert('提示信息', json.message, 'info');
                    }
                }
            });
        });
        win.find('button.close').click(function() {
            win.window('close');
        });
    })();
</script>
